package com.netflexitysolutions.amazonws.ec2.internal.operations;

import com.amazonaws.ec2.doc._2009_04_04.ReleaseAddressType;
import com.netflexitysolutions.amazonws.ec2.EC2;

public class ReleaseAddressOperation extends SingleObjectOperationExecutor<ReleaseAddressType, Boolean> {

	public ReleaseAddressOperation(EC2 ec2, String publicIp) {
		super(ec2, publicIp);
	}

	@Override
	protected Boolean call(ReleaseAddressType request) {
		request.setPublicIp(objectId);
		return getEC2().getService().releaseAddress(request).isReturn();
	}

}
